﻿using Jay.Sc2.Bof.Lib.State;

namespace Jay.Sc2.Bof.Lib.Action
{
	public class ActionGeneric : Action
	{

		public delegate void ActionExecuteDelegate(IBuildOrder bo);
		private ActionExecuteDelegate m_ExecuteDelegate;
		public ActionGeneric(string name, ActionExecuteDelegate executeDelegate)
		{
			m_Name = name;
			m_ExecuteDelegate = executeDelegate;
		}
		public override void Execute(IBuildOrder bo) { if (m_ExecuteDelegate != null) m_ExecuteDelegate(bo); }
		private string m_Name;
		public override string Name { get { return m_Name; } }

		public override bool HaveResources(IBuildOrder bo) { return true; }
		public override bool HaveTechnology(IBuildOrder bo) { return true; }
		public override bool IsInvalid(IBuildOrder bo) { return false; }
	}
}
